<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        a {
            text-decoration: none;
        }
        
        li {
            list-style: none;
        }
        
        .head {
            display: flex;
            height: 70px;
            padding: 0 100px;
            font-size: 18px;
            line-height: 70px;
            background-color: purple;
            border-bottom: 1px solid #ccc;
            justify-content: space-between;
            background-color: #999;
        }
        
        .head li:hover {
            background-color: tomato;
        }
        
        .left ul {
            display: flex;
        }
        
        .left ul li {
            padding: 0 20px;
        }
        
        .left a {
            color: #fff;
        }
        
        .right ul {
            display: flex;
        }
        
        .right ul li {
            padding: 0 20px;
        }
        
        .right ul li:nth-child(2)::after {
            content: "";
            display: inline-block;
            width: 10px;
            height: 10px;
            background-color: tomato;
        }
        
        .right a {
            color: #fff;
        }
        
        .select {
            display: none;
            position: fixed;
            top: 70px;
            right: 363px;
            width: 76px;
            text-align: center;
            border: 1px solid yellow;
        }
        
        .select li {
            height: 50px;
            line-height: 50px;
            border-bottom: 1px solid #ccc;
        }
    </style>
</head>

<body>
    <div class="head">
        <div class="left">
            <ul>
                <li><a href="#">设为首页</a></li>
                <li><a href="#">手机新浪网</a></li>
                <li><a href="#">移动客户端</a></li>
            </ul>
        </div>

        <div class="right">
            <ul>
                <li><a href="#">登录</a></li>
                <li id="weibo"><a href="#">微博</a></li>
                <li><a href="#">博客</a></li>
                <li><a href="#">邮箱</a></li>
                <li><a href="#">网站导航</a></li>
            </ul>
        </div>
    </div>
    <div class="select">
        <ul>
            <li>私信</li>
            <li>评论</li>
            <li>@我</li>
        </ul>
    </div>
    <script>
        var weibo = document.getElementById("weibo");
        var select = document.querySelector(".select");
        var flag = 1;
        weibo.onclick = function() {
            if (flag == 1) {
                select.style.display = "block";
                flag = 0;
            } else {
                select.style.display = "none";
                flag = 1;
            }
        }
    </script>
</body>

</html>